package Server.dao;

import Server.entity.Message;
import Server.entity.ShopOrder;
import Server.entity.Users;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface MessageDao extends JpaRepository<Message,String> {
    List<Message> findByUserAndReadMIOrderByModifiedTime(Users users, Integer read);
    List<Message> findByAuthorOrderByModifiedTimeAsc(Users author);
    Message findByShopOrder(ShopOrder shopOrder);
}
